/* Copyright 2001,2002,2003 NAH6 BV
 * All Rights Reserved
 *
 *  $Header: /var/lib/cvs/secphone/ui/rng/fortuna/fnaGenerator.h,v 1.3 2003/11/21 12:39:24 itsme Exp $
 *
 *
 */


#ifndef __FNAGENERATOR_H__

#include "vectorutils.h"
#include "fnaBlockCypher.h"
#include "fnaCounter.h"

//--------------------------------------------------------------------------
class Generator {
public:
    Generator();

    void Initialize();
    void Reseed(const ByteVector& seed);

    bool PseudoRandomData(int nBytesRequested, ByteVector& r);

private:
    BlockCypher m_cypher;
    Counter m_counter;

    bool GenerateBlocks(int nBlocksRequested, ByteVector& r);
};


#define __FNAGENERATOR_H__
#endif
